#ifndef LV_QRCODE_H
#define LV_QRCODE_H

#ifdef __cplusplus
extern "C" {
#endif
#include "lv_conf.h"

#ifdef USE_LV_QRCODE

#include "lvgl/src/lv_core/lv_obj.h"

/*
    cid: string which will be coded
    (px, py): where to put the qrcode image
    width: width of the qrcode image, should be the multiple of 21,
          otherwise the actural width will be the max number not greater than width and also be
          the mlutiple of 21.
*/
lv_obj_t *qrcode_gen(lv_obj_t * par, const char *cid, int px, int py, int width);
lv_obj_t *qrcode_gen_with_color(lv_obj_t * par, const char *cid, int px, int py, int width, lv_color_t color);
void qrcode_release(lv_obj_t *canvas);

#endif /* USE_LV_QRCODE */

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* LV_QRCODE_H */
